package com.forest.onlinechat.controller;

import com.forest.onlinechat.pojo.FriendGroups;
import com.forest.onlinechat.pojo.Result;
import com.forest.onlinechat.service.Impl.FriendGroupsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 好友分组
 */
@RestController
@RequestMapping("/online/friend/groups")
public class FriendGroupsController {
    @Autowired
    private FriendGroupsServiceImpl friendGroupsService;


    @GetMapping
    public Result<List<FriendGroups>> getFriendGroups() {
        return Result.success(friendGroupsService.getFriendGroups());
    }

}
